﻿using System;
using System.Collections.Generic;
using System.Text;

namespace DataService.Core.ModeCode
{
    public class ColumnPropertyAttribute : Attribute
    {
        /// <summary>
        /// 字符长度(数据定义的字符长度 如varchar(30))
        /// </summary>
        public int ValueLength { get; set; }
        /// <summary>
        /// 占用字节长度(数据定义的字符长度 如varchar(30),一汉字占用2字节，该值=60)
        /// </summary>
        public int ColLength { get; set; }
        public string ColumnType { get; set; }
        public string ColumnDes { get; set; }
        public ColumnPropertyAttribute(int length, string typeName, string columndes = null,int colLength=0)
        {
            this.ValueLength = length;
            this.ColumnType = typeName;
            ColumnDes = columndes;
            this.ColLength = colLength;
        }
    }
}
